package com.hfh.main.report.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Getter;
import lombok.Setter;
import lombok.experimental.Accessors;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;
import java.util.Date;

/**
 * 周表
 */
@Getter
@Setter
@Accessors(chain = true)
@TableName("col_week")
@Schema(name = "WeekEntity", description = "$!{table.comment}")
public class WeekEntity extends Model<WeekEntity> {

    @Schema(description = "主键")
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    @Schema(description = "年")
    @TableField("year")
    private Integer year;

    @Schema(description = "月份")
    @TableField("month")
    private Integer month;

    @Schema(description = "周序号")
    @TableField("week_number")
    private Integer weekNumber;


    @Schema(description = "学号")
    @TableField("user_acc")
    private String acc;

    @Schema(description = "分数")
    @TableField("week_score")
    private Double weekScore;


    @Schema(description = "内容")
    @TableField("week_content")
    private String weekContent;

    @Schema(description = "评价人")
    @TableField("week_evaluator")
    private String weekEvaluator;

    @Schema(description = "创建者")
    @TableField("create_by")
    private String createBy;

    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @Schema(description = "创建时间")
    @TableField("create_time")
    private Date createTime;

    @Schema(description = "更新者")
    @TableField("update_by")
    private String updateBy;

    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @Schema(description = "更新时间")
    @TableField("update_time")
    private Date updateTime;

    @Schema(description = "伪删除")
    @TableField("undock")
    private Integer undock;

    @Schema(description = "状态")
    @TableField("state")
    private Integer state;

    @Schema(description = "备注")
    @TableField("remark")
    private String remark;


    @Override
    public Serializable pkVal() {
        return this.id;
    }
}
